<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>实例10-vue中添加class的方法</title>
	<style>
		.red{color:red;}
		.fz50{font-size: 50px;}
	</style>
	<script src="./js/vue.js"></script>
</head>
<body>
	<!-- 模板 -->
	<div id="demo">
		 <span class="fz50" v-bind:class="{red:addClass}">hello,miaov!</span>
	</div>

	<script>
		var vdata = {
			// true添加名为red的class类,false不添加
			addClass: true
		}
		// 渲染
		vm = new Vue({
			el:"#demo",
			data:vdata
		});
	</script>
</body>
</html>